package com.softserve.academy.food.services.main;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.softserve.academy.food.dao.HibernateDish;
import com.softserve.academy.food.model.mDish;
import com.softserve.academy.food.services.supplement.Convector;

@Service
public class dishService
{
	@Autowired
	protected HibernateDish daoDish;
	
	@Transactional
	public mDish getDish( String id )
	{
		return new mDish( daoDish.Read( Convector.StringToInt(id) ) );
	}
	
}
